﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ITProject.Domain.Entities;

namespace ITProject.WebUI.Models.ProjectUser
{
    public class RepositoryProjectUserViewModel
    {
        public int Id { get; set; }
        public int ProjectId { get; set; }
        public int UserId { get; set; }
        public DateTime CreateDate { get; set; }
        public int Type { get; set; }
        public string Description { get; set; }
        public string Filename { get; set; }

        public static RepositoryProjectUserViewModel Convert(SVNHistory hist)
        {
            RepositoryProjectUserViewModel vm = new RepositoryProjectUserViewModel();
            vm.Id = hist.Id;
            vm.ProjectId = hist.ProjectId;
            vm.UserId = hist.UserId;
            vm.CreateDate = hist.CreateDate;
            vm.Type = hist.Type;
            vm.Description = hist.Description;
            vm.Filename = hist.Filename;
            return vm;
        }
    }
}